package com.honey.company.statement;

import java.util.Date;

import org.java.plugin.Plugin;

import com.honey.compilation.java.AbstractJavaCompilation;
import com.honey.core.Extension;
import com.honey.core.utils.TimeUtility;
import com.honey.generator.java.extension.point.BeginFileCommentListener;

public class GnuGeneralPublicLicense extends Extension<Plugin> implements BeginFileCommentListener{
	
	static final String []gun= new String[]{
		"",
		"Copyright (C) 2002-"+TimeUtility.format(new Date(), TimeUtility.FORMAT_YEAR)+" Takis Diakoumis",
		"",
		"This program is free software; you can redistribute it and/or",
		"modify it under the terms of the GNU General Public License",
		"as published by the Free Software Foundation; either version 3",
		"of the License, or any later version.",
		"",
		"This program is distributed in the hope that it will be useful,",
		"but WITHOUT ANY WARRANTY; without even the implied warranty of",
		"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the",
		"GNU General Public License for more details.",
		"",
		"You should have received a copy of the GNU General Public License",
		"along with this program. If not, see <http://www.gnu.org/licenses/>.",
	};
	
	public GnuGeneralPublicLicense(Plugin belongPlugin) {
		super(belongPlugin);
		
	}

	@Override
	public void doListener(AbstractJavaCompilation clazz) {
		clazz.addFileComment(clazz.getType().getShortName()+".java");
		
		clazz.addFileComment(gun);
	}
	
	@Override
	public void clean() {
		
	}
}
